var TSUI;
(function (TSUI) {
    (function (Animation) {
        var FadeAnimator = (function () {
            function FadeAnimator() {
            }
            FadeAnimator.prototype.Show = function (control, callback) {
                if (typeof callback === "undefined") { callback = null; }
                control.AnimationElement().stop(true, true).css({
                    display: "",
                    visibility: "",
                    opacity: 0
                });
                control.AnimationElement().animate({
                    opacity: 1
                }, FadeAnimator.AnimationTime, FadeAnimator.AnimationEasing, function () {
                    if (callback !== null) {
                        callback();
                    }
                });
            };

            FadeAnimator.prototype.Hide = function (control, callback) {
                if (typeof callback === "undefined") { callback = null; }
                control.AnimationElement().stop(true, true);
                control.AnimationElement().animate({
                    opacity: 0
                }, FadeAnimator.AnimationTime, FadeAnimator.AnimationEasing, function () {
                    $(this).css({
                        visibility: "hidden",
                        opacity: 1
                    });

                    if (callback !== null) {
                        callback();
                    }
                });
            };
            FadeAnimator.AnimationTime = 300;

            FadeAnimator.AnimationEasing = "swing";
            return FadeAnimator;
        })();
        Animation.FadeAnimator = FadeAnimator;
    })(TSUI.Animation || (TSUI.Animation = {}));
    var Animation = TSUI.Animation;
})(TSUI || (TSUI = {}));
